# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-system-monitor
pkgver=40.1
pkgrel=1
pkgdesc="View current processes and monitor system state"
url="https://wiki.gnome.org/Apps/SystemMonitor"
arch=(x86_64)
license=(GPL)
depends=(libgtop gtkmm3 librsvg systemd libhandy polkit)
makedepends=(meson yelp-tools git appstream-glib)
groups=(gnome)
_commit=d486367183e49e226b6989f59bb469c24e203f5e  # tags/40.1^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-system-monitor.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
